Skip to content

fix(btcindexer): integration fixes and type improvements#187

Closed
Copilot wants to merge 9 commits intomasterfrom
copilot/sub-pr-186
Closed

fix(btcindexer): integration fixes and type improvements#187
Copilot wants to merge 9 commits intomasterfrom
copilot/sub-pr-186

Conversation

Copy link
Contributor

Copilot AI commented Nov 18, 2025

Description

Follow up on: #154

Fixes integration issues between btcindexer and block-ingestor. Improves type safety by moving shared types to lib and establishing consistent naming conventions.

Type System

  • Shared types: Moved BlockQueueRecord, BtcNet, and kvBlocksKey to @gonative-cc/lib/nbtc
  • New interfaces: NbtcTxInsertion, NbtcTxUpdate, NbtcBroadcastedDeposit, ElectrsTxResponse for type-safe storage operations
  • Naming: snake_case → camelCase for consistency (nbtc_pkgnbtcPkg, sui_networksuiNetwork, etc.)

Logging

  • Centralized logger: Created @gonative-cc/lib/logger with structured JSON output
  • Error context: Added logError(ctx, error) utility with method names for debugging
  • Removed: errutils.ts in favor of unified logger

Configuration

  • Binding names: btc_blocksBtcBlocks, BlockStoreBtcBlocks (PascalCase consistency)
  • Block queue: Added timestamp_ms to BlockQueueRecord for proper block tracking
  • Cleanup: Fixed trailing commas in wrangler.jsonc

Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • added appropriate labels to the PR
  • provided a link to the relevant issue or specification
  • added a changelog entry to CHANGELOG.md
  • included doc comments for public functions
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

robert-zaremba and others added 9 commits November 18, 2025 15:42
Signed-off-by: Robert Zaremba <robert@zaremba.ch>
Signed-off-by: Robert Zaremba <robert@zaremba.ch>
Signed-off-by: Robert Zaremba <robert@zaremba.ch>
Signed-off-by: Robert Zaremba <robert@zaremba.ch>
Signed-off-by: Robert Zaremba <robert@zaremba.ch>
Signed-off-by: Robert Zaremba <robert@zaremba.ch>
Copilot AI changed the title [WIP] Fix ingestor integration and types fix(btcindexer): integration fixes and type improvements Nov 18, 2025
Copilot AI requested a review from robert-zaremba November 18, 2025 16:48
Base automatically changed from robert/fix-ingestor-integration to master November 18, 2025 23:44
@robert-zaremba robert-zaremba deleted the copilot/sub-pr-186 branch November 18, 2025 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants